<template>
<div >
  <el-table
    :data="tableData"
    stripe
    style="width: 360px; margin: auto; margin-top: 100px;">
    <el-table-column
      prop="id"
      label="訂單編號"
      width="180">
    </el-table-column>
    <el-table-column
      prop="status"
      label="狀態"
      width="180">
    </el-table-column>
  </el-table>
</div>
</template>

<script>
export default {
  name: "List",
  data() {
    return {
      tableData : [],
    }
  },
  created() {
    this.$http.get("/order/list").then((response) => {

      console.log(response);

      this.tableData = response.data;

      for (let i = 0; i < this.tableData.length; i++) {

        this.tableData[i].status = "未付款";

      }

    });
  }
}
</script>

<style scoped>

</style>
